import request from "../utils/request";

// 菜单列表请求接口
export const accountIndex = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/account_list", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};

// 菜单添加请求接口
export const accountAdd = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/account_add", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
// 菜单编辑请求接口
export const accountEdits = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/account_update", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
// 菜单删除请求接口
export const accountDeletes = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/account_del", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
// 用户列表请求接口
export const roleIndex = (data?: any) => {
  return new Promise(resolve => {
    request({
      url: "/pcapi/power/role_list", // url
      params: data
    }).then(res => {
      // 成功回调
      resolve(res);
    });
  });
};
